package net.luoran.dvm.service.impl;

import net.luoran.dvm.mapper.ElementMapper;
import net.luoran.dvm.service.ElementService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.luoran.dvm.entity.ElementDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 大屏元素 服务实现类
 * </p>
 *
 * @author MyBatisPlusGenerater
 * @since 2020-10-29
 */
@Service
@Transactional
public class ElementServiceImpl extends ServiceImpl<ElementMapper, ElementDO> implements ElementService {

    @Autowired
    private ElementMapper elementMapper;
    @Override
    public void removeByElementId(Integer id) {
        elementMapper.deleteById(id);
    }

    @Override
    public void saveElement(ElementDO elementDO) {
        elementMapper.insert(elementDO);
    }

    @Override
    public void saveOrUpdateElement(ElementDO elementDO) {
        elementMapper.updateById(elementDO);
    }
}
